Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic Makefile.rules #37

Merged
merged 14 commits into from
Jan 15, 2014
Merged

Conversation

BuFran
Copy link
Member

@BuFran BuFran commented Jan 1, 2014

Remove duplication of Makefile.includes and move the base into Makefile.rules, generic for all stm32 examples.

Some testing to the flashers is needed

ISSUES:
generic flasher code in current version doesn't work (needs to add some specific parameters)

@karlp
Copy link
Member

karlp commented Jan 2, 2014

Looks generally good at first glance. Might need to update some docs a little to say how to use liboencm3 in your own project?

@BuFran
Copy link
Member Author

BuFran commented Jan 2, 2014

Currently I need to solve the flashing problem first, and make some tests with it on the real hardware.

Maybe the flashing rules will be better stripped out from the Makefile.rules to the Makefile.flashoocd, Makefile.flashbmp ... it is idea

endif
endif
ARCH_FLAGS = -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd
#-march=armv7 ???
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just drop this -march line, the -mcpu supersedes it and is more precise anyway.

@BuFran
Copy link
Member Author

BuFran commented Jan 6, 2014

Updated tree, correted suggestions from @karlp, changed of authorship of one commit to @onnokort.

Free to new testing try :-)

@karlp
Copy link
Member

karlp commented Jan 14, 2014

I think this has enough good stuff in it now to merge it, anything else can probably just be addressed later

@ChuckM
Copy link
Contributor

ChuckM commented Jan 14, 2014

That will make my testing easier. I tried to add the pull branch as a
remote in my tracking repo and have not been successful in getting that to
work. I'm still tracking down the fp/non-fp thing. As far as I can tell, on
Linux using the 4.7 arm-none-eabi toolchain still breaks for floating point
(when you link against the lib/fpu libraries it hard faults, if you link
against the libraries in lib it complains that the code is compiled with
VFP and the libraries aren't. There are several variables here:

  1. The makefiles in libopencm3
  2. the configuration/build of the ARM launchpad toolchain for Linux
  3. my building/installing of the loc3 stuff into that toolchain.

Still working through each to insure all are in alignment.

--Chuck

On Tue, Jan 14, 2014 at 1:45 PM, Karl Palsson notifications@github.comwrote:

I think this has enough good stuff in it now to merge it, anything else
can probably just be addressed later


Reply to this email directly or view it on GitHubhttps://github.com//pull/37#issuecomment-32310795
.

@BuFran
Copy link
Member Author

BuFran commented Jan 14, 2014

@ChuckM 3) AHA ! that can be the point of your malfunction ! I do not recommend the installation of locm3 into toolchain. As README says that WILL broke the build and WILL generate hard faults. The locm in the toolchain cannot use any -L and -I flags, and the build system provides it always ! (currently detection is skipped). I recommend to specify OPENCM3_DIR to root of your built library.

This commit wil be my first push to master via rebase, hopefully good, so i place a time for that tomorrow. Thanks for review, @karlp

@ChuckM
Copy link
Contributor

ChuckM commented Jan 15, 2014

You are correct Frantisek! After restructuring my makes to not use the
toolchain dir they started working as expected! Woo hoo, I've got useful
floating point.

Given the embedded nature of the -examples plus -loc3 as a sub-repository
should we take out the
DETECT_TOOLCHAIN option for building in the examples tree?

On Tue, Jan 14, 2014 at 3:04 PM, Frantisek Burian
notifications@github.comwrote:

@ChuckM https://github.com/ChuckM 3) AHA ! that can be the point of
your malfunction ! I do not recommend the installation of locm3 into
toolchain. As README says that WILL broke the build and WILL generate hard
faults. The locm in the toolchain cannot use any -L and -I flags, and the
build system provides it always ! (currently detection is skipped). I
recommend to specify OPENCM3_DIR to root of your built library.

This commit wil be my first push to master via rebase, hopefully good, so
i place a time for that tomorrow. Thanks for review, @karlphttps://github.com/karlp


Reply to this email directly or view it on GitHubhttps://github.com//pull/37#issuecomment-32317648
.

@BuFran BuFran merged commit 1b98ef8 into libopencm3:master Jan 15, 2014
@BuFran BuFran deleted the pulls/Makefile-rules branch January 15, 2014 11:59
@BuFran
Copy link
Member Author

BuFran commented Jan 15, 2014

Merged via rebase at 1b98ef8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants